package com.xl98.service;

import com.xl98.entity.User;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author ls
 * @since 2020-05-15
 */
public interface UserService extends IService<User> {
    //根据用户类型查询
    public List<User> findByRole(String roleId);
    //根据ID或username查询用户
    public User findByString(Map<String,String> map);
    //查询所有用户
    public List<User> findAllUser();
    //更新用户
    public int updateUser(User user);

    //根据角色查询用户
    public List<User> findAllByRole(String roleId);
    //更新用户状态
    public int updateUserState(Map<String,String> map);

    /**
     * 注册
     * @param user
     * @return
     */
    int regist(User user);
}
